
/*
dojo.addOnLoad(function() {
    // Create a button programmatically:
	var button = new dijit.form.Button({
		label: "Click me!",
			onClick: function() {
		    
			}
		},
	"progButtonNode");
});
*/


/**
 * database bean object
 * @param {Object} ds driverString
 * @param {Object} sa serverAddress
 * @param {Object} dp databasePort
 * @param {Object} dn databaseName
 * @param {Object} un userName
 * @param {Object} up userPassword
 */
function DATABASE_BEAN(ds,sa,dp,dn,un,up,dt){
	driverStr:"";
	serverAddr:"";
	dbPort:"";
	dbName:"";
	userName:"";
	userPass:"";
	dbType:"";
	this.driverStr=ds;
	this.serverAddr=sa;
	this.dbPort=dp;
	this.dbName=dn;
	this.userName=un;
	this.userPass=up;
	this.dbType=dt;
}

function setDrivers(t){
	var db;
	if(t=="MsSqlServer2000")
	{
		db=new DATABASE_BEAN("com.microsoft.jdbc.sqlserver.SQLServerDriver","127.0.0.1","1433","ProjectManager","sa","SqlMsde@InfoxEie2000",t);
	}
	if(t=="Oracle"){
		db=new DATABASE_BEAN("oracle.jdbc.driver.OracleDriver","127.0.0.1","1521","orcl","scott","tiger",t);
		
	}
	if(t=="MySql"){
		db=new DATABASE_BEAN("org.gjt.mm.mysql.Driver","127.0.0.1","3306","metaldb","root","SqlMsde@InfoxEie2000",t);
	}
	
	dojo.byId("driverStr").value=db.driverStr;
	dojo.byId("serverAddr").value=db.serverAddr;
	dojo.byId("dbPort").value=db.dbPort;
	dojo.byId("dbName").value=db.dbName;
	dojo.byId("userName").value=db.userName;
	dojo.byId("userPass").value=db.userPass;
}
